<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="https://unpkg.com/vue/dist/vue.js"></script>

</head>
<body>
    <div id="app">
       <div @click.once="handlClick">
           <button @click.stop="handlButtonClick">阻止冒泡</button>
           <button @click.once="handlButtonClick">限制一次</button>
           <input type="text" @keyup.65="handleKeyUp">
           <input type="text" @keyup.alt.65="handleKeyUp2">
           <form action="#" @submit="handlSubmit">
             <button>提交</button>   
           </form>
               
        </div>


    </div>

    <script>
    new Vue({
        el:"#app",
        methods:{
           handlClick(){
               alert('div clicked')
           },
           handlButtonClick(){
               alert('button clicked')
           },
           handlSubmit(){
               alert('form submited')
           },
           handleKeyUp(){
               alert('A is clicked')
           },
           handleKeyUp2(){
               alert('A and alt is clicked')
           }
        }
        
        
        
        });
    
    
    </script>
</body>
</html>